package model;

import org.hoyi.DB.comment.DbAttrANNO;
import org.hoyi.DB.comment.EntityAttrANNO;
import org.hoyi.DB.comment.datatype;
import org.hoyi.DB.ctrl.HOYI;
import org.hoyi.DB.ctrl.HOYICMD;
import org.hoyi.DB.ents.Entity;
import org.hoyi.DB.model.AttField;


/**
*  实体类 orders 属性说明自动提取数据库字段的描述信息.
*/
@EntityAttrANNO(tablename="orders", comment="订单")
public class orders extends Entity{
	//#region 静态字段
	/// <summary>
	/// 订单编号
	/// </summary>
	public static AttField ordersid = new AttField("ordersid");		
	/// <summary>
	/// 订单名称
	/// </summary>
	public static AttField ordersname = new AttField("ordersname");		
	/// <summary>
	/// 订单类型
	/// </summary>
	public static AttField orderstype = new AttField("orderstype");		
	/// <summary>
	/// 创建时间
	/// </summary>
	public static AttField createtime = new AttField("createtime");		
	/// <summary>
	/// 备注
	/// </summary>
	public static AttField notes = new AttField("notes");		
	   
	//#endregion 静态字段
	
	
	//#region 字段
	/// <summary>
	/// 订单编号
	/// </summary>	
	@DbAttrANNO(type=datatype.Bigint,  Length = 30, Comment = "订单编号", FieldName = "ordersid",isPK= true,Identity=true)
	public String Ordersid ;		

	/// <summary>
	/// 订单名称
	/// </summary>	
	@DbAttrANNO(type=datatype.Varchar,  Length = 50, Comment = "订单名称", FieldName = "ordersname")
	public String Ordersname ;		

	/// <summary>
	/// 订单类型
	/// </summary>	
	@DbAttrANNO(type=datatype.Varchar,  Length = 50, Comment = "订单类型", FieldName = "orderstype")
	public String Orderstype ;		

	/// <summary>
	/// 创建时间
	/// </summary>	
	@DbAttrANNO(type=datatype.Varchar,  Length = 20, Comment = "创建时间", FieldName = "createtime")
	public String Createtime ;		

	/// <summary>
	/// 备注
	/// </summary>	
	@DbAttrANNO(type=datatype.Varchar,  Length = 50, Comment = "备注", FieldName = "notes", NotNULL = true)
	public String Notes ;		
	
	/// <summary>
	/// 订单编号
	/// </summary>	
	
	public String getOrdersid(){
		if(this.Ordersid == null)
			return "";
		return this.Ordersid;
	}
	
	public void setOrdersid(String _ordersid)
	{
		this.Ordersid = _ordersid;
		
	}
	/// <summary>
	/// 订单名称
	/// </summary>	
	
	public String getOrdersname(){
		if(this.Ordersname == null)
			return "";
		return this.Ordersname;
	}
	
	public void setOrdersname(String _ordersname)
	{
		this.Ordersname = _ordersname;
		
	}
	/// <summary>
	/// 订单类型
	/// </summary>	
	
	public String getOrderstype(){
		if(this.Orderstype == null)
			return "";
		return this.Orderstype;
	}
	
	public void setOrderstype(String _orderstype)
	{
		this.Orderstype = _orderstype;
		
	}
	/// <summary>
	/// 创建时间
	/// </summary>	
	
	public String getCreatetime(){
		if(this.Createtime == null)
			return "";
		return this.Createtime;
	}
	
	public void setCreatetime(String _createtime)
	{
		this.Createtime = _createtime;
		
	}
	/// <summary>
	/// 备注
	/// </summary>	
	
	public String getNotes(){
		if(this.Notes == null)
			return "";
		return this.Notes;
	}
	
	public void setNotes(String _notes)
	{
		this.Notes = _notes;
		
	}
	 
	//#endregion 字段
	
				
	public static orders NEW(){
		return new orders();
	} 
	
	public orders() {
	}
	
	public orders( String _ordersname ,  String _orderstype ,  String _createtime ,  String _notes ){
		 this.Ordersname =  _ordersname;
		 this.Orderstype =  _orderstype;
		 this.Createtime =  _createtime;
		 this.Notes =  _notes;
		
	}	
	
	public orders( String _ordersid ,  String _ordersname ,  String _orderstype ,  String _createtime ,  String _notes ){
		 this.Ordersid =  _ordersid;
		 this.Ordersname =  _ordersname;
		 this.Orderstype =  _orderstype;
		 this.Createtime =  _createtime;
		 this.Notes =  _notes;
		
	}	
	
	//#region 语法所迫, 初始化命令.
	
	public static HOYICMD E() {
			return HOYI.E(orders.class);
	}
	
	@Override
	public String getFirstfield() {
		// TODO Auto-generated method stub
		return "ordersid";
	}
	
	@Override
	public String getSecondfield() {
		// TODO Auto-generated method stub
		return "ordersname";
	}

	//#endregion 语法所迫, 初始化命令.
}
